#include <QApplication>
#include <QPushButton>
#include <QLineEdit>
#include <QDialog>
#include <QLabel>

//QSpinBox
int main(int argc , char **argv)
{
	/* 根据构造函数 构建qt应用程序对象 */
	QApplication app(argc , argv);
	/* 创建父窗口 */
	QDialog *parent = new QDialog();
	/* 创建父窗口大小 */
	parent->resize(700,300);
	/* 创建一个QLineEdit对象，并将其挂靠到父窗口 */
	QLineEdit *add = new QLineEdit(parent);
	QLineEdit *added = new QLineEdit(parent);
	QLineEdit *res = new QLineEdit(parent);
	QLabel *oper = new QLabel("+",parent);
	QPushButton *equ = new QPushButton("=",parent);

	add->move(50,100);
	oper->move(200,100);

	added->move(300,100);
	equ->move(150,200);
	res->move(300,200);
	/* 创建事件关联 */
	/*QObject::connect(btn2, SIGNAL(clicked()),
                  parent,  SLOT(close()));*/
	parent->show();	
	return app.exec();
}
